<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<jsp:include page="/WEB-INF/jsp/common/_head.jsp" />
<link rel="stylesheet" href="/static/vendor/upload/css/jquery.fileupload.css" type="text/css" />
<%@ include file="/WEB-INF/jsp/common/_includes.jsp"%>
<div class="ui grid">
	<div class="row">
		<div class="column">
			<div class="ui two column grid">
				<div class="three wide column">
					<jsp:include page="/WEB-INF/jsp/common/_sidebar.jsp">
						<jsp:param name="index" value="104" />
					</jsp:include>
				</div>
				<div id="container" class="thirteen wide column">
					<ol class="breadcrumb">
						<li><a href="">后台管理</a></li>
						<li class="active">代理附件管理</li>
					</ol>
					<ul class="nav nav-pills" role="tablist">
                        <li role="presentation" class="active"><a href="/support/toAgentAdd">上传附件</a></li>
                    </ul>
				 
					<ul class="nav nav-pills" role="tablist">
						<li role="presentation" class="active">
							<form class="navbar-form navbar-left" role="search">
								<div>
									<div class="form-group">
										<input type="text" class="form-control" name="kw"
											value="${not empty param.kw ? param.kw : ''}">
									</div>
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</form>
						</li>
					</ul>
					<table class="table table-hover">
						<thead>
							<tr>
								<th>ID</th>
								<th>文件名称</th>
								<th>文件路径</th>
								<th>创建人</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${paginate.pageList}" var="agentAttachment">
								<tr>
									<td>${agentAttachment.id}</td>
									<td><a href="${agentAttachment.fileUrl }" target="_blank">${agentAttachment.fileName}</a></td>
									<td>${agentAttachment.fileUrl}</td>
									<td>${agentAttachment.createUser }</td>
									<td><fmt:formatDate value="${agentAttachment.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
									<td><a class="btn active btn-primary" href="/support/${agentAttachment.id}/toAgentEdit">编辑</a></td>
									<td>
									<a class="btn active btn-danger" isAudit="true"  label="确认删除？" title="删除" ref="/support/${agentAttachment.id}/agentDelete" href="javaScript:;">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<div class="page-info clearfix">
						<jsp:include page="/WEB-INF/jsp/common/_page.jsp"/>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/WEB-INF/jsp/common/_foot.jsp"></jsp:include>
<script type="text/javascript" src="/static/js/support/list.js"></script>
<script src="/static/vendor/upload/js/vendor/jquery.ui.widget.js"></script>
<script src="/static/vendor/upload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="/static/vendor/jquery.validate/jquery.validate.js"></script>
<script src="/static/vendor/upload/js/jquery.fileupload.js"></script>
<script type="text/javascript">
$(function(){
	$('.agentAttachmentImg').qtip({
		content: {
			text: function(event, o){
				var url = $(this).attr('data');
				return '<iframe width="480" height="360" frameborder="0" scrolling="no" src="' +url+'"></iframe>';
			},
			button: true
		},
		show: {
			event: 'click'
		},
		hide: {
			event: 'unfocus'
		},
		style : {
			classes : 'qtip-preview',
			tip : false
		},
		position: {
			my: 'center', at: 'center',
			target : $(window)
		}
	});
});
</script>